
#!/bin/bash
. /etc/profile


startDate=`date +"%Y%m%d" -d "-1 days"`
endDate=`date +"%Y%m%d" -d "-1 days"`

#获取时间循环列表
startSec=`date -d "$startDate" "+%s"`
endSec=`date -d "$endDate" "+%s"`

for((i=startSec;i<=endSec;i+=86400)); do
    curdate=`date -d "@$i" "+%Y%m%d"`
    echo $curdate

    for((k=0;k<=23;k++));
	do 	
		fhour=$k
		if [[ $k -lt 10 ]]; then
			fhour='0'$k
		fi
		echo "================"$curdate" "$fhour

		/home/hadoop/shx/clean_timecost/clean_timecost.sh $curdate $fhour
		
	done
done

